package cn.edu.hbsi.web.controller;

import cn.edu.hbsi.domain.GaoTianYuan;
import cn.edu.hbsi.service.GaoTianYuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController
{
    @Autowired
    private GaoTianYuanService gaoTianYuanService;

    @GetMapping(value = "/login")
    public GaoTianYuan login(@RequestParam("name") String name){
        return gaoTianYuanService.getUserByName(name);
    }
}